home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / dsx12j.zip / QUICKREF.DOC < prev    next >
Text File  |  1992-01-05  |  16KB  |  705 lines

  1.  
  2.  
  3.  
  4.  
  5.             
  6.                DOSNIX QUICK REFERENCE GUIDE
  7.             Copyr. 1991 by G. Vrooman
  8.                All rights reserved.
  9.                     
  10.  
  11.      
  12.  
  13.      GETTING STARTED:
  14.  
  15.       If you have a hard drive, make a directory named C:\DOSNIX
  16.     and copy the DOSNIX files into it.  To use DOSNIX from any
  17.     directory, you need the following statement in your AUTOEXEC.BAT
  18.     file:
  19.  
  20.            PATH = C:;C:\DOSNIX
  21.  
  22.       If you already have a path statement, add ;C:\DOSNIX to the
  23.     end of it.  If you don't have an AUTOEXEC.BAT file, you can
  24.     make one with any handy text editor.  The following line will
  25.     help you keep track of where you are on your hard drive:
  26.  
  27.         PROMPT $P$G
  28.  
  29.     This will make your current directory part of your prompt.
  30.  
  31.  
  32.       If you don't have a hard drive, you can make a bootable floppy 
  33.     disk with COMMAND.COM, FORMAT.COM, PRINT.COM and any other MSDOS 
  34.     utilities you need.  Copy as many DOSNIX utilities as you can to 
  35.     it and use it as a working disk.  
  36.  
  37.       If you have 640k of ram you can use part of it for a ram disk.
  38.     Make a bootable floppy disk with a directory named \BIN and copy 
  39.     all desired utilities to \BIN. Copy VDISK.SYS (some versions of MSDOS 
  40.     use RAMDISK.SYS) to the root directory and create the following files 
  41.     in the root directory:
  42.  
  43.         CONFIG.SYS:
  44.  
  45.                 files = 10
  46.                 buffers = 20
  47.                 device = vdisk.sys 256
  48.  
  49.  
  50.         AUTOEXEC.BAT:
  51.  
  52.             copy bin\*.* c:\
  53.             copy command.com c:\
  54.             copy cauto.bat c:\autoexec.bat
  55.             c:
  56.             command /p
  57.  
  58.  
  59.  
  60.  
  61.  
  62.         CAUTO.BAT:
  63.  
  64.             path = c:\
  65.             set COMSPEC = c:\command.com
  66.             prompt $p$g
  67.  
  68.  
  69.       When you boot your computer with this disk you will have a 256k 
  70.     ramdisk named C:, containing DOS and all your utilities.  You will 
  71.     still have 384k of free ram, and your floppy drives will now be free 
  72.     for other purposes.  If you have extended memory, you can use
  73.  
  74.             device = vdisk.sys 256 /e
  75.  
  76.     to configure your ram disk in extended memory.
  77.  
  78.  
  79.  
  80.     DOSNIX OPTIONS:
  81.  
  82.       Most DOSNIX commands have a simple format which can be enhanced 
  83.     by the use of UNIX style option strings.  The option string is always 
  84.     the first argument after the command and usually begins with a "-".  
  85.     See DOSNIX.DOC for the options available with each command.
  86.  
  87.       If you are used to MSDOS switches and find this awkward you can 
  88.     insert the following line in your AUTOEXEC.BAT file:
  89.  
  90.             SET SWITCH=/     (No space before or after "=")
  91.  
  92.     All commands except CHMOD and READ will recognize a "/" as an option 
  93.     delimiter.  If you don't use this feature, you can use slashes in 
  94.     path names, as in UNIX, and they will be converted to back slashes.
  95.  
  96.  
  97.     INSTANT HELP:
  98.  
  99.       DOSNIX.DOC has now been keyed for quick command searches and
  100.     a HELP.BAT file has been included.  To obtain on-line help, type 
  101.     "help" and the name of the subject with which you want help.  In
  102.     addition, a brief summary of most commands can be obtained by typing 
  103.     the name of the command followed by a "-?". 
  104.  
  105.  
  106.     
  107.     NOTE:
  108.  
  109.     UNIX is a registered trademark of AT&T corporation
  110.         MSDOS is a registered trademark of Microsoft corporation
  111.  
  112.  
  113.  
  114.                         
  115.  
  116.  
  117.             STANDARD INPUT (STDIN) AND STANDARD OUTPUT (STDOUT)
  118.  
  119.  
  120.       DOSNIX utilities make extensive use of STDIN and STDOUT.  STDIN
  121.     is the keyboard unless you decide to redirect it.  STDOUT is the
  122.     screen unless you decide to redirect it.  Redirection is done by
  123.     using the MSDOS operators; <, >, >> and |.
  124.  
  125.     <     used with a program that normally reads from STDIN.  It 
  126.         tells MSDOS to use the contents of a file for STDIN.
  127.         For example: 
  128.  
  129.             more < dosnix.doc
  130.  
  131.           
  132.     >    writes STDOUT to a file.  For example:
  133.  
  134.             cat dosnix.doc
  135.  
  136.         writes DOSNIX.DOC to the screen, while
  137.  
  138.             cat dosnix.doc > another.doc
  139.  
  140.         copies DOSNIX.DOC to ANOTHER.DOC.
  141.  
  142.  
  143.     >>    appends STDOUT to an existing file or writes STDOUT
  144.         to a new file.  For example:
  145.  
  146.             cat quickref.doc >> dosnix.doc
  147.  
  148.         appends QUICKREF.DOC to DOSNIX.DOC.  Unfortunately
  149.         this operator will leave an unwanted CTRL-Z between
  150.         the two files.  For this reason, DOSNIX includes an 
  151.         APP command.
  152.  
  153.  
  154.     |    The pipeline operator. Uses STDOUT as STDIN for a
  155.         second program.  For example:
  156.  
  157.             cat *.doc | read
  158.  
  159.         pipes all files with an extension of .DOC to READ.
  160.  
  161.  
  162.  
  163.       UNIX and DOSNIX provide an additional command, TEE, which
  164.     will write STDOUT to the screen and store it in a file at
  165.     the same time.  For example:
  166.  
  167.             cat dosnix.doc | tee another.doc
  168.  
  169.     writes DOSNIX.DOC to the screen and stores it in ANOTHER.DOC.
  170.  
  171.  
  172.  
  173.     
  174.  
  175.  
  176.  
  177.                         LIST OF DOSNIX COMMANDS
  178. -------------------------------------------------------------------------------
  179.  
  180.  
  181.         APP             append standard input to file(s).
  182.  
  183.         CAT             Copy text file(s) to standard output.
  184.  
  185.         CHMOD           Modify attribute(s) of file.
  186.  
  187.         CLR             Set screen foreground, background and border colors.
  188.  
  189.         CP              Copy file to new file or directory.
  190.  
  191.         CPDIR           Copy directory and all subdirectories.
  192.  
  193.         DB              Delete all files except specified files.
  194.  
  195.     EDC        Easy Directory Change.
  196.  
  197.         FFIND           Find all copies of file in specified path.
  198.  
  199.         GET             Find all filenames containing specified string.
  200.  
  201.         LS              List contents of directory.
  202.  
  203.         MV              Move file to new file or directory.
  204.  
  205.         MVDIR           Move directory and all subdirectories to new location.
  206.  
  207.         READ            Display text file in page format.
  208.  
  209.         RM              Remove file(s).
  210.  
  211.         RN              Rename file or directory.
  212.  
  213.     SGREP        Search files(s) for text.
  214.  
  215.     SPLIT        Split a text file into smaller pieces.
  216.  
  217.         TEE             Copy standard input to standard output and file(s).
  218.  
  219.         TOLOWER         Convert standard input to lower case.
  220.  
  221.         TOUCH           Modify file time and date.
  222.  
  223.         TOUPPER         Convert standard input to upper case.
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.     CHANGING SCREEN COLORS:            (ver. 0.93+)
  234.  
  235.  
  236.     clr gre                    Changes screen color
  237.                         to green with black
  238.                         background and border.
  239.  
  240.     clr -b gre                Changes screen color to
  241.                         high intensity green with
  242.                         black background and border.
  243.  
  244.     clr blu whi                Changes screen color to
  245.                         blue with white background
  246.                         and border.
  247.  
  248.     clr -b whi blu whi            Changes screen color to
  249.                         high intensity white with 
  250.                         blue background    and white 
  251.                         border.
  252.  
  253.     clr bla whi                Changes screen color to
  254.                         black on white. (reverse
  255.                         video)
  256.  
  257.     clr                    Clears screen without
  258.                         resetting color attributes.
  259.  
  260.  
  261.  
  262.         Other colors:    red, cya, mag, yel, amb
  263.  
  264.  
  265.  
  266.     Hint:  Try "clr yel amb".  This combination is pleasing and won't
  267.            singe your eyeballs like some combinations.  
  268.  
  269.  
  270.     ANSI.SYS:
  271.  
  272.       ANSI.SYS is the MSDOS graphics device driver.  With ANSI.SYS, you  
  273.     can use CLS to clear the screen without losing your colors.  It is
  274.     also required with many communications programs to view ANSI graphics  
  275.     on bulletin boards.  To install ANSI.SYS, copy it to the root directory 
  276.     of your boot drive and add the following line to CONFIG.SYS:
  277.  
  278.             device = ansi.sys
  279.  
  280.  
  281.         
  282.  
  283.  
  284.  
  285.  
  286.  
  287.     LISTING FILES:
  288.  
  289.  
  290.     ls                    Lists all files in
  291.                         current directory in
  292.                         five column format.
  293.  
  294.     ls -l                    Lists all files in
  295.                         long format like 
  296.                         DOS DIR command.
  297.  
  298.     ls -lt                    Lists all files in
  299.                         long format, sorted
  300.                         by date, oldest files
  301.                         first.
  302.  
  303.     ls -lrt                    Lists all files in
  304.                         long format, most
  305.                         recent files first.
  306.  
  307.  
  308.     ls -le                    Lists all files in 
  309.                         long format, sorted
  310.                         by extension.
  311.  
  312.     ls \                    Lists all files in
  313.                         root directory.
  314.  
  315.     ls c:\cshow                lists all files in
  316.                         C:\CSHOW
  317.  
  318.     ls . \ c:\dosnix            Lists all files in current
  319.                         directory, root directory
  320.                         and C:\DOSNIX
  321.  
  322.     ls *.txt                Lists all files in current
  323.                         directory with an extension
  324.                         of .TXT
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.     LOCATING FILES:
  333.  
  334.  
  335.     ffind calvin.gif            Searches current drive for
  336.                         all copies of CALVIN.GIF.
  337.  
  338.     ffind c: calvin.gif            Searches drive C: for all
  339.                         copies of CALVIN.GIF.
  340.  
  341.     ffind *: wyeth.gif            Searches all hard drives for
  342.                         all copies of WYETH.GIF.
  343.     
  344.     ffind -f *: wyeth.gif            Searches all available drives
  345.                         for all copies of WYETH.GIF.
  346.  
  347.     ffind -r *.bak                Locates and removes all
  348.                         files with an extension
  349.                         of .BAK on current drive.
  350.  
  351.     ffind -i *: *.bak            Searches all drives for
  352.                         .BAK files and allows you
  353.                         choose which ones to delete.
  354.  
  355.     ffind -l list.txt            Locates all copies of LIST.TXT
  356.                         and displays attribute, size,
  357.                         date and time.
  358.  
  359.     ffind -m c: *.*                Finds all files on drive C:
  360.                         and displays totals for each
  361.                         subdirectory.
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.     CHANGING DIRECTORIES:
  369.  
  370.     cd \pcplus\downlds\utils        Changes directory to
  371.     edc util                \PCPLUS\DOWNLDS\UTILS
  372.  
  373.     cd d:\downlds\graphics\gif        Changes directory to
  374.     edc d:gif                D:\DOWNLDS\GRAPHICS\GIF
  375.  
  376.     edc -s                    Scans current drive and
  377.                         stores PATH.EDC in root
  378.                         directory. 
  379.  
  380.     edc -s d:gif                Scans drive D, stores copy
  381.                         of PATH.EDC in D:\ and
  382.                         changes directory to
  383.                         D:\DOWNLDS\GRAPHICS\GIF
  384.  
  385.         edc -t                    Displays directory tree
  386.                         while scanning.
  387.  
  388.     edc -l                      Displays a list of directories.
  389.  
  390.  
  391.  
  392.  
  393.  
  394.     COPYING FILES:
  395.  
  396.  
  397.     cp dosnix.doc dosnix.bak        Copies DOSNIX.DOC to
  398.                         DOSNIX.BAK.
  399.  
  400.     cp dosnix.doc \tempdir            Copies DOSNIX.DOC to
  401.                         \TEMPDIR.
  402.  
  403.     cp *.* \tempdir                Copies all files in
  404.     cp . \tempdir                current directory to
  405.                         \TEMPDIR.
  406.  
  407.     cp oldir newdir                Copies all files in
  408.                         OLDIR to NEWDIR.
  409.  
  410.     cp -i tempdir a:\            Lists all files in
  411.                         TEMPDIR and allows
  412.                         you to choose which
  413.                         ones to copy to A:\
  414.  
  415.     cp -m ted.asm \assmblr a:\source    Copies TED.ASM to \ASSMBLR
  416.                         and A:\SOURCE.
  417.  
  418.     cp -bco c:\text a:\            Copies only archive files in 
  419.                         C:\TEXT, clears archive bit
  420.                         and overwrites any previously
  421.                         existing files in A:\ .
  422.  
  423.                         
  424.  
  425.     MOVING FILES:
  426.  
  427.  
  428.     mv dosnix.bak dosnix.doc        Moves DOSNIX.BAK to
  429.     rn dosnix.bak dosnix.doc        DOSNIX.DOC.
  430.  
  431.     mv dosnix.doc \DOC            If \DOC is an existing
  432.     rn dosnix.doc \DOC            directory, moves DOSNIX.DOC
  433.                         to \DOC\DOSNIX.DOC, otherwise
  434.                         moves DOSNIX.DOC to a file
  435.                         named \DOC . 
  436.  
  437.     mv *.* \tempdir                moves all files in current
  438.     mv . \tempdir                directory to \TEMPDIR.
  439.  
  440.     mv oldir newdir                Moves all files in OLDIR 
  441.                         to NEWDIR.
  442.  
  443.     mv -i tempdir a:\            Lists all files in
  444.                         TEMPDIR and allows
  445.                         you to choose which
  446.                         ones to move to A:\
  447.  
  448.                         
  449.  
  450.  
  451.     MOVING DIRECTORIES:
  452.  
  453.  
  454.     mvdir oldir newdir            Renames OLDIR to NEWDIR.
  455.     rn oldir newdir
  456.  
  457.     mvdir \text \vde\text            Moves \TEXT to \VDE\TEXT
  458.  
  459.     mvdir c:\stuff a:\stuff            Moves C:\STUFF to A:\STUFF.
  460.                         If a disk full error occurs
  461.                         leaves C:\STUFF intact.
  462.  
  463.     mvdir c:\basic c:\basic\source          Generates error message.
  464.  
  465.  
  466.  
  467.  
  468.     REMOVING FILES:
  469.  
  470.  
  471.     rm dosnix.bak                Removes DOSNIX.BAK
  472.  
  473.     rm *.bak                Removes all .BAK files
  474.                         in current directory.
  475.  
  476.     rm -i *.*                Displays all files in
  477.                         current directory and
  478.                         allows you to choose
  479.                         which ones to delete.
  480.  
  481.     rm tempdir\*.*                Removes all files in
  482.                         TEMPDIR but leaves
  483.                         directory.
  484.  
  485.     rm -r tempdir                Removes TEMPDIR along
  486.                         with all files and sub-
  487.                         directories.
  488.  
  489.     rm -r a:\                Removes all files and
  490.                         directories on drive A:
  491.  
  492.     db dosnix94.zip                Deletes all files in
  493.                         current directory except
  494.                         DOSNIX94.ZIP.
  495.  
  496.     db *.c *.exe                Deletes all files except
  497.                         .C and .EXE files.
  498.  
  499.  
  500.  
  501.  
  502.  
  503.     MODIFYING FILE ATTRIBUTES AND TIMES:
  504.  
  505.  
  506.     touch dosnix.doc            Changes time and date of
  507.                         DOSNIX.DOC to current DOS
  508.                         time and date.
  509.  
  510.     touch *.*                Changes time and date of
  511.                         all files in directory to
  512.                         current DOS time and date.
  513.  
  514.     touch -t ted.com            TOUCH will prompt you
  515.                         for a time and date 
  516.                         before modifying TED.COM.
  517.  
  518.     touch -t 07/04/91;16:30:00 test.txt     Changes time and date of
  519.                         TEST.TXT to 4:30 PM, July 4, 
  520.                         1991.
  521.  
  522.     chmod -a *.*                Removes those pesky archive
  523.                         bits from all files in the
  524.                         current directory.
  525.  
  526.     chmod +a records.txt            Restores the archive bit to
  527.                         RECORDS.TXT, to remind you
  528.                         that you haven't backed it up.    
  529.  
  530.     chmod +r homework.txt            Makes HOMEWORK.TXT a read
  531.                         only file so your kid brother
  532.                         won't erase it by mistake.
  533.  
  534.     chmod +h vanna.gif            Hides VANNA.GIF so your wife
  535.                         or boss won't see it.
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.                 USING CAT, APP and TEE
  543.  
  544.  
  545.     cat > test.txt                Copies whatever is typed
  546.                         on the keyboard to TEST.TXT.
  547.                         Use CTRL-Z to quit.
  548.  
  549.     cat whats.new dosnix.doc        Writes WHATS.NEW and 
  550.                         DOSNIX.DOC to screen.
  551.  
  552.     cat whats.new dosnix.doc > docs.txt     Concatenates WHATS.NEW
  553.                         and DOSNIX.DOC and stores
  554.                         them in DOCS.TXT.
  555.  
  556.     cat *.c > csource.txt            Concatenates all files with
  557.                         an extension of .C and
  558.                         stores them in CSOURCE.TXT.
  559.  
  560.     cat newutil.c | app csource.txt        Appends NEWUTIL.C to
  561.     app < newutil.c csource.txt        CSOURCE.TXT.
  562.  
  563.     app < newutil.c > csource.txt        Totally destroys CSOURCE.TXT.
  564.  
  565.     cat newutil.c >> csource.txt        Appends NEWUTIL.C to
  566.                         CSOURCE.TXT but leaves
  567.                         a CTRL-Z between the two 
  568.                         files.
  569.  
  570.     cat *.c | tee csource.txt        Concatenates all files with
  571.                         an extension of .C and stores
  572.                         them in CSOURCE.TXT while
  573.                         writing them to the screen.
  574.  
  575.     cat *.c | tee csource.txt | read    Same as above except pipes
  576.                         screen output to READ.
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.             USING READ        (ver. 0.94f+)
  586.  
  587.  
  588.     read                    Reads from STDIN. Not
  589.                         very useful by itself.
  590.                         If you get stuck in this
  591.                         mode type CTRL-Z to get
  592.                         out.
  593.  
  594.     read dosnix.doc                Displays contents of
  595.                         DOSNIX.DOC.
  596.  
  597.     read whats.new dosnix.doc        Displays contents of
  598.                         WHATS.NEW and DOSNIX.DOC.
  599.  
  600.     read *.doc                Displays contents of all
  601.                         files with an extension
  602.                         of .DOC .
  603.  
  604.  
  605.  
  606.     KEYPAD COMMANDS:
  607.  
  608.  
  609.         PgDn                          Clears screen and displays
  610.                         next page.
  611.  
  612.     PgUp                    Clears screen and displays
  613.                         previous page.
  614.  
  615.  
  616.         Down Arrow                Displays next line.
  617.  
  618.     Up Arrow                Moves back one line.
  619.  
  620.     Right Arrow                Shifts screen one tab stop 
  621.                         right.
  622.  
  623.     Left Arrow                Shifts screen one tab stop left.
  624.  
  625.         Home, ^PgUp                       Moves to beginning of file.
  626.  
  627.         End, ^PgDn                   Moves to end of file.
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.     UNIX COMMANDS:
  637.  
  638.  
  639.         <space>                     Scrolls until spacebar is 
  640.                         pressed again. (Not quite
  641.                         UNIX).
  642.                         
  643.         ^D, D                       Displays next half page of text.
  644.  
  645.         Enter                         Displays next line of text.
  646.  
  647.         ^U, U                               Moves back one half page.
  648.  
  649.     ^B, B                      Clears screen and displays 
  650.                         previous page.
  651.  
  652.         H                           Displays help page.
  653.  
  654.         ^L, .                         Rewrites current page.
  655.  
  656.         $                        Moves to end of file.
  657.  
  658.         N                           Moves to next file.
  659.  
  660.         Q                           Terminates the program.
  661.     
  662.  
  663.     NOTE: ^ stands for Ctrl key.
  664.  
  665.  
  666.  
  667.  
  668.     NUMERIC AND SEARCH COMMANDS:
  669.  
  670.  
  671.  
  672.     -100                        Moves back 100 lines.
  673.  
  674.         +100                        Moves forward 100 lines.
  675.  
  676.         100                         Moves to line number 100.
  677.  
  678.  
  679.     \CHMOD                    Searches text for first
  680.                         occurrence of "CHMOD".
  681.  
  682.     /                    Searches text for next 
  683.                         occurrence of "CHMOD". 
  684.  
  685.  
  686.     ALTERNATE KEYS:
  687.  
  688.     F1, Backspace                           H, Display help screen.
  689.  
  690.     F10, Del                Escape
  691.  
  692.     [                    ^U, Move back one half page.
  693.  
  694.     ]                    ^D, Move down one half page.
  695.  
  696.     
  697.     
  698.  
  699.     NOTE: READ will maintain whatever color attribute is present when you run
  700.           it.  This means you can set your screen colors with CLR and then
  701.       use READ to view text files in whatever color you like.  READ will
  702.       determine appropriate highlight and menu bar colors.
  703.  
  704.  
  705.